var url1 = "https://gitee.com/liang_shanshui/dytalk/raw/master/config.json";
var url2 = "https://gitee.com/liang_shanshui/dytalk/raw/master/login.js";
var url3 = "https://gitee.com/liang_shanshui/dytalk/raw/master/main.js";
var r1 = http.get(url1);
var r2 = http.get(url2);
var r3 = http.get(url3);

if (r1.statusCode == 200) {
    toastLog("第1个文件更新成功");
    var 路径1 = engines.myEngine().cwd();
    var str1 = r1.body.string();
    sleep(1000);
    if (r2.statusCode == 200) {
        toastLog("第2个文件更新成功");
        var 路径2 = engines.myEngine().cwd();
        var str2 = r2.body.string();
        sleep(1000);
        if (r3.statusCode == 200) {
            toastLog("第3个文件更新成功");
            var 路径3 = engines.myEngine().cwd();
            var str3 = r3.body.string();
            sleep(1000);
            engines.execScript("main", str3);
        }else{
            toastLog("第3个文件更新失败");
        }
    }else{
        toastLog("第2个文件更新失败");
    }
}else{
    toastLog("第1个文件更新失败");
}
